
/**
 * @description Object.prototype.toString
 * @param {*} val
 * @returns { boolean }
 */
export const toString = Object.prototype.toString;

/**
 * @description 1
 * @param {*} val
 * @returns { boolean }
 */
export const isNumber = val => '[object Number]' === toString.call(val);

/**
 * @description true
 * @param {*} val
 * @returns { boolean }
 */
export const isBoolean = val => '[object Boolean]' === toString.call(val);

/**
 * @description undefined
 * @param {*} val
 * @returns { boolean }
 */
export const isUndefined = val => '[object Undefined]' === toString.call(val);

/**
 * @description ''
 * @param {*} val
 * @returns { boolean }
 */
export const isString = val => '[object String]' === toString.call(val);

/**
 * @description []
 * @param {*} val
 * @returns { boolean }
 */
export const isArray = val => '[object Array]' === toString.call(val);

/**
 * @description async function(){}
 * @param {*} val
 * @returns { boolean }
 */
export const isAsyncFunction = val => '[object AsyncFunction]' === toString.call(val);

/**
 * @description function(){}
 * @param {*} val
 * @returns { boolean }
 */
export const isFunction = val => '[object Function]' === toString.call(val);

/**
 * @description null
 * @param {*} val
 * @returns { boolean }
 */
export const isNull = val => '[object Null]' === toString.call(val);

/**
 * @description function* (){}
 * @param {*} val
 * @returns { boolean }
 */
export const isGeneratorFunction = val => '[object GeneratorFunction]' === toString.call(val);

/**
 * @description Symbol
 * @param {*} val
 * @returns { boolean }
 */
export const isSymbol = val => '[object Symbol]' === toString.call(val);

/**
 * @description BigInt(9007199254740991)
 * @param {*} val
 * @returns { boolean }
 */
export const isBigInt = val => '[object BigInt]' === toString.call(val);
